<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

	<ui:composition template="../comum/template.xhtml" >
	
		<ui:define name="conteudo"><!-- oque estiver aqui dentro vai substituir o conteudo do template -->
				<p:panel header="Cadastro de Usuarios"
					style="width:50%; margin-top:10%;">
					<p:panelGrid columns="2">
						<p:outputLabel for="nome" value="Nome:" style="font-weight:bold" />
						<p:inputText id="nome" value="#{cadUsuario.usuario.nome}"/>

						<p:outputLabel for="cpf" value="Cpf:" style="font-weight:bold" />
						<p:inputText id="cpf" value="#{cadUsuario.usuario.cpf}"/>

						<p:outputLabel for="senha" value="Senha:" style="font-weight:bold" />
						<p:password id="senha" value="#{cadUsuario.usuario.senha}"/>

						<p:outputLabel for="senha2" value="Repetir Senha:"
							style="font-weight:bold" />
						<p:password id="senha2" value="#{cadUsuario.validaSenha}"/>

						<p:outputLabel for="permissoes" value="Tipo:"
							style="font-weight:bold" />
						<p:selectOneRadio id="permissoes"
							value="#{cadUsuario.permissao}" >
							<f:selectItem itemLabel="Aluno" itemValue="#{permissao.aluno}" />
							<f:selectItem itemLabel="Professor" itemValue="#{permissao.professor}" />
						</p:selectOneRadio>

					</p:panelGrid>
					<p:commandButton id="btnLogin" value="Submit"
						actionListener="#{cadUsuario.cadastrar}" update="messages"
						style="margin:10px 0px 0px 60%;" />
					<p:messages id="messages" showDetail="true" autoUpdate="true"
						closable="true" />
				</p:panel>
	</ui:define>
	<ui:define name="menuitem"></ui:define>
</ui:composition>

</html>